<?php
include_once "conn.php";
$n=is_numeric($_GET['n'])?$_GET['n']:exit('No Net!');
$rs = $db->query("SELECT * FROM ".DB_PREFIX."qqs where is3gqq>0 and (next3gqq<'$now' or next3gqq IS NULL) and sidzt=0");
while($row=$rs->fetch()){ 
	if($config['crontype']){
		$qid=$row['qid'];
		$uin=$row['qq'];
		$sid=$row['sid'];

		$next=date("Y-m-d H:i:s",time()+60*5-10);
		@$db->exec("update ".DB_PREFIX."qqs set last3gqq='$now',next3gqq='$next' where qid='$qid'");
		@get_curl('http://pt.3g.qq.com/s?aid=nLogin3gqqbysid&3gqqsid='.$sid);
		@get_curl('http://q32.3g.qq.com/g/s?sid='.$sid.'&s=10&aid=chgStatus');
	}else{
		$urls[]="{$nurl}3gqq.run.php?cron=".$_GET['cron']."&qid={$row['qid']}{$look}";
	}
}

if(!$config['crontype']){
	if($urls){
		$get=duo_curl($urls);
	}
	if($_GET['get']==1){
		print_r($get);
	}
}
exit('Ok!');


